feat: add network validation for subgraph contract addresse#2083
feat: add network validation for subgraph contract addresse#2083Harshdev098 wants to merge 2 commits intographprotocol:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 6a2c1aa The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hey @timmclean Can you please review it! |
|
I'll have a look |
There was a problem hiding this comment.
A couple of things:
- sign the commits (this is a repo requirement): https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
- make it pass lint
pnpm lintand testspnpm test - add minor-version changeset
pnpm changeset
66aa0b3 to
0cae2ea
Compare
|
@YaroShkvorets Thanks! Have done the required changes |
|
But I have signedoff while amending the last commit @YaroShkvorets |
|
You haven't added GPG key to your GitHub account to make it verified: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification |
Signed-off-by: Harsh Dev Pathak <harshoxfordgkp@gmail.com>
|
@YaroShkvorets Yah have done it! |
YaroShkvorets
left a comment
There was a problem hiding this comment.
This approach doesn't work.
You are querying Graph node JSON RPC endpoint for transaction count when you should be querying EVM chain JSON RPC instead. Graph node doesn't support eth_* methods.
Technically you can load the networks registry, get JSON RPC endpoint for that chain and try querying it. Just keep in mind that there could be dead ones, non-evm chains, and other edge cases you need to handle.
Also before submitting a PR it's a good idea to verify the fix works at least on a happy path.
|
Hey @YaroShkvorets, Can you please review it! I have successfully tested it locally |

fix: #617
Adds a pre-deployment check to warn users if subgraph contract addresses don’t exist on the target network.